<?php
	require_once '../../Helpers/PathHelper.php';
	require_once  '../../Helpers/DbHelper.php';
	require_once  '../../Controllers/AdminController.php';
	require_once  '../../Controllers/UserController.php';
  //
  $u = new UserController();
  $u->evaluatePagePermission(UserController::STUDENT);
  //
  if(isset($_SESSION))
	  $uid = $_SESSION['loggedUser']['UserId'];
	//
	$a = new AdminController();
	$pDetails = $a->getPaymentLogsByStudent($uid);
?>
<html>
  <head>
    <title>Student :: Payment History</title>
    <?php
      require_once '../commons.php';
      renderHeaderStyles() ;
    ?>
  </head>
  <body>
  <div class="admin-container">
    <?php renderStudentView();?>
  </div>
  <div class="container">
		<div class="inner">
		  <h1>PAYMENT HISTORY</h1>
      <table align="center" class="inner card" border="1">
      <tr>
        <th width="200">Payment Date</th>
        <th width="200" colspan="2">Payment Amount</th>
      </tr>
      <?php
        $content = "";
        while($rows = mysql_fetch_assoc($pDetails))
        {
          $content.='<tr><td>'.$rows['PaymentDate'].'</td><td width="100">'.$rows['PaymentAmount'].'</td></tr>';
        }
        echo $content;
      ?>
    </table>
		</div>
	</div>
	</body>
</html>